package org.leo.test.guava.eventbus.day1;

import com.google.common.eventbus.AsyncEventBus;
import lombok.extern.slf4j.Slf4j;

import java.util.concurrent.Executors;

/**
 * <p>
 *
 * </p>
 *
 * @Package: org.leo.test.guava.eventbus.day1
 * @ClassName: AsyncExample
 * @author: Li.Junlin
 * @date: 2019.12.16 15:10
 */
@Slf4j
public class AsyncExample {
    public static void main(String[] args) {
        AsyncEventBus asyncEventBus = new AsyncEventBus(Executors.newFixedThreadPool(3));
        asyncEventBus.register(new AsyncListener());
        asyncEventBus.post("test");
        log.info("message send succeed.");
    }
}
